package xian.woniuxy.hisbe.entity;

import java.util.ArrayList;
import java.util.List;

public class PatientExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public PatientExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPatIdIsNull() {
            addCriterion("pat_id is null");
            return (Criteria) this;
        }

        public Criteria andPatIdIsNotNull() {
            addCriterion("pat_id is not null");
            return (Criteria) this;
        }

        public Criteria andPatIdEqualTo(Integer value) {
            addCriterion("pat_id =", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdNotEqualTo(Integer value) {
            addCriterion("pat_id <>", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdGreaterThan(Integer value) {
            addCriterion("pat_id >", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("pat_id >=", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdLessThan(Integer value) {
            addCriterion("pat_id <", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdLessThanOrEqualTo(Integer value) {
            addCriterion("pat_id <=", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdIn(List<Integer> values) {
            addCriterion("pat_id in", values, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdNotIn(List<Integer> values) {
            addCriterion("pat_id not in", values, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdBetween(Integer value1, Integer value2) {
            addCriterion("pat_id between", value1, value2, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdNotBetween(Integer value1, Integer value2) {
            addCriterion("pat_id not between", value1, value2, "patId");
            return (Criteria) this;
        }

        public Criteria andPatNameIsNull() {
            addCriterion("pat_name is null");
            return (Criteria) this;
        }

        public Criteria andPatNameIsNotNull() {
            addCriterion("pat_name is not null");
            return (Criteria) this;
        }

        public Criteria andPatNameEqualTo(String value) {
            addCriterion("pat_name =", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameNotEqualTo(String value) {
            addCriterion("pat_name <>", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameGreaterThan(String value) {
            addCriterion("pat_name >", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameGreaterThanOrEqualTo(String value) {
            addCriterion("pat_name >=", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameLessThan(String value) {
            addCriterion("pat_name <", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameLessThanOrEqualTo(String value) {
            addCriterion("pat_name <=", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameLike(String value) {
            addCriterion("pat_name like", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameNotLike(String value) {
            addCriterion("pat_name not like", value, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameIn(List<String> values) {
            addCriterion("pat_name in", values, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameNotIn(List<String> values) {
            addCriterion("pat_name not in", values, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameBetween(String value1, String value2) {
            addCriterion("pat_name between", value1, value2, "patName");
            return (Criteria) this;
        }

        public Criteria andPatNameNotBetween(String value1, String value2) {
            addCriterion("pat_name not between", value1, value2, "patName");
            return (Criteria) this;
        }

        public Criteria andPatAgeIsNull() {
            addCriterion("pat_age is null");
            return (Criteria) this;
        }

        public Criteria andPatAgeIsNotNull() {
            addCriterion("pat_age is not null");
            return (Criteria) this;
        }

        public Criteria andPatAgeEqualTo(Integer value) {
            addCriterion("pat_age =", value, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeNotEqualTo(Integer value) {
            addCriterion("pat_age <>", value, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeGreaterThan(Integer value) {
            addCriterion("pat_age >", value, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeGreaterThanOrEqualTo(Integer value) {
            addCriterion("pat_age >=", value, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeLessThan(Integer value) {
            addCriterion("pat_age <", value, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeLessThanOrEqualTo(Integer value) {
            addCriterion("pat_age <=", value, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeIn(List<Integer> values) {
            addCriterion("pat_age in", values, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeNotIn(List<Integer> values) {
            addCriterion("pat_age not in", values, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeBetween(Integer value1, Integer value2) {
            addCriterion("pat_age between", value1, value2, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAgeNotBetween(Integer value1, Integer value2) {
            addCriterion("pat_age not between", value1, value2, "patAge");
            return (Criteria) this;
        }

        public Criteria andPatAddrIsNull() {
            addCriterion("pat_addr is null");
            return (Criteria) this;
        }

        public Criteria andPatAddrIsNotNull() {
            addCriterion("pat_addr is not null");
            return (Criteria) this;
        }

        public Criteria andPatAddrEqualTo(String value) {
            addCriterion("pat_addr =", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrNotEqualTo(String value) {
            addCriterion("pat_addr <>", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrGreaterThan(String value) {
            addCriterion("pat_addr >", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrGreaterThanOrEqualTo(String value) {
            addCriterion("pat_addr >=", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrLessThan(String value) {
            addCriterion("pat_addr <", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrLessThanOrEqualTo(String value) {
            addCriterion("pat_addr <=", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrLike(String value) {
            addCriterion("pat_addr like", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrNotLike(String value) {
            addCriterion("pat_addr not like", value, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrIn(List<String> values) {
            addCriterion("pat_addr in", values, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrNotIn(List<String> values) {
            addCriterion("pat_addr not in", values, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrBetween(String value1, String value2) {
            addCriterion("pat_addr between", value1, value2, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatAddrNotBetween(String value1, String value2) {
            addCriterion("pat_addr not between", value1, value2, "patAddr");
            return (Criteria) this;
        }

        public Criteria andPatPhoneIsNull() {
            addCriterion("pat_phone is null");
            return (Criteria) this;
        }

        public Criteria andPatPhoneIsNotNull() {
            addCriterion("pat_phone is not null");
            return (Criteria) this;
        }

        public Criteria andPatPhoneEqualTo(String value) {
            addCriterion("pat_phone =", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneNotEqualTo(String value) {
            addCriterion("pat_phone <>", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneGreaterThan(String value) {
            addCriterion("pat_phone >", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneGreaterThanOrEqualTo(String value) {
            addCriterion("pat_phone >=", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneLessThan(String value) {
            addCriterion("pat_phone <", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneLessThanOrEqualTo(String value) {
            addCriterion("pat_phone <=", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneLike(String value) {
            addCriterion("pat_phone like", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneNotLike(String value) {
            addCriterion("pat_phone not like", value, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneIn(List<String> values) {
            addCriterion("pat_phone in", values, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneNotIn(List<String> values) {
            addCriterion("pat_phone not in", values, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneBetween(String value1, String value2) {
            addCriterion("pat_phone between", value1, value2, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatPhoneNotBetween(String value1, String value2) {
            addCriterion("pat_phone not between", value1, value2, "patPhone");
            return (Criteria) this;
        }

        public Criteria andPatIdcardIsNull() {
            addCriterion("pat_idcard is null");
            return (Criteria) this;
        }

        public Criteria andPatIdcardIsNotNull() {
            addCriterion("pat_idcard is not null");
            return (Criteria) this;
        }

        public Criteria andPatIdcardEqualTo(String value) {
            addCriterion("pat_idcard =", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardNotEqualTo(String value) {
            addCriterion("pat_idcard <>", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardGreaterThan(String value) {
            addCriterion("pat_idcard >", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardGreaterThanOrEqualTo(String value) {
            addCriterion("pat_idcard >=", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardLessThan(String value) {
            addCriterion("pat_idcard <", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardLessThanOrEqualTo(String value) {
            addCriterion("pat_idcard <=", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardLike(String value) {
            addCriterion("pat_idcard like", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardNotLike(String value) {
            addCriterion("pat_idcard not like", value, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardIn(List<String> values) {
            addCriterion("pat_idcard in", values, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardNotIn(List<String> values) {
            addCriterion("pat_idcard not in", values, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardBetween(String value1, String value2) {
            addCriterion("pat_idcard between", value1, value2, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatIdcardNotBetween(String value1, String value2) {
            addCriterion("pat_idcard not between", value1, value2, "patIdcard");
            return (Criteria) this;
        }

        public Criteria andPatPasswordIsNull() {
            addCriterion("pat_password is null");
            return (Criteria) this;
        }

        public Criteria andPatPasswordIsNotNull() {
            addCriterion("pat_password is not null");
            return (Criteria) this;
        }

        public Criteria andPatPasswordEqualTo(String value) {
            addCriterion("pat_password =", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordNotEqualTo(String value) {
            addCriterion("pat_password <>", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordGreaterThan(String value) {
            addCriterion("pat_password >", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordGreaterThanOrEqualTo(String value) {
            addCriterion("pat_password >=", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordLessThan(String value) {
            addCriterion("pat_password <", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordLessThanOrEqualTo(String value) {
            addCriterion("pat_password <=", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordLike(String value) {
            addCriterion("pat_password like", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordNotLike(String value) {
            addCriterion("pat_password not like", value, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordIn(List<String> values) {
            addCriterion("pat_password in", values, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordNotIn(List<String> values) {
            addCriterion("pat_password not in", values, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordBetween(String value1, String value2) {
            addCriterion("pat_password between", value1, value2, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatPasswordNotBetween(String value1, String value2) {
            addCriterion("pat_password not between", value1, value2, "patPassword");
            return (Criteria) this;
        }

        public Criteria andPatBalanceIsNull() {
            addCriterion("pat_balance is null");
            return (Criteria) this;
        }

        public Criteria andPatBalanceIsNotNull() {
            addCriterion("pat_balance is not null");
            return (Criteria) this;
        }

        public Criteria andPatBalanceEqualTo(Float value) {
            addCriterion("pat_balance =", value, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceNotEqualTo(Float value) {
            addCriterion("pat_balance <>", value, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceGreaterThan(Float value) {
            addCriterion("pat_balance >", value, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceGreaterThanOrEqualTo(Float value) {
            addCriterion("pat_balance >=", value, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceLessThan(Float value) {
            addCriterion("pat_balance <", value, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceLessThanOrEqualTo(Float value) {
            addCriterion("pat_balance <=", value, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceIn(List<Float> values) {
            addCriterion("pat_balance in", values, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceNotIn(List<Float> values) {
            addCriterion("pat_balance not in", values, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceBetween(Float value1, Float value2) {
            addCriterion("pat_balance between", value1, value2, "patBalance");
            return (Criteria) this;
        }

        public Criteria andPatBalanceNotBetween(Float value1, Float value2) {
            addCriterion("pat_balance not between", value1, value2, "patBalance");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}